﻿Imports System
Imports NHibernate.Mapping.Attributes

<Serializable()> _
<[Class](Table:="aspnet_Users")> _
Public Class UserObj
    Private myUserId As Guid
    Private myUserName As String
    Private myLastActivityDate As DateTime
    Private myDisplayName As String
    Private myEmail As String
    Private myPaidMoney As String
    Private myStillAlive As Boolean

    <Id(0, Name:="UserName")> _
    <Generator(1, Class:="guid")> _
    Public Overridable Property UserId() As Guid
        Get
            Return myUserId
        End Get
        Set(ByVal value As Guid)
            myUserId = value
        End Set
    End Property

    <[Property]()> _
    Public Overridable Property UserName() As String
        Get
            Return myUserName
        End Get
        Set(ByVal value As String)
            myUserName = value
        End Set
    End Property

    <[Property]()> _
    Public Overridable Property DisplayName() As String
        Get
            Return myDisplayName
        End Get
        Set(ByVal value As String)
            myDisplayName = value
        End Set
    End Property

    <[Property]()> _
    Public Overridable Property Email() As String
        Get
            Return myEmail
        End Get
        Set(ByVal value As String)
            myEmail = value
        End Set
    End Property

    <[Property]()> _
    Public Overridable Property LastActivityDate() As DateTime
        Get
            Return myLastActivityDate
        End Get
        Set(ByVal value As DateTime)
            myLastActivityDate = value
        End Set
    End Property

    <[Property]()> _
    Public Overridable Property PaidMoney() As String
        Get
            Return myPaidMoney
        End Get
        Set(ByVal value As String)
            myPaidMoney = value
        End Set
    End Property

    <[Property]()> _
    Public Overridable Property StillAlive() As Boolean
        Get
            Return myStillAlive
        End Get
        Set(ByVal value As Boolean)
            myStillAlive = value
        End Set
    End Property

    Public Overridable ReadOnly Property DisplayHasPaid() As String
        Get
            If IsDBNull(PaidMoney) OrElse PaidMoney Is Nothing Then
                Return ""
            Else
                Return PaidMoney
            End If
        End Get
    End Property

End Class
